home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / bgui11b.lha / include / libraries / bgui_macros.h next >
Encoding:
C/C++ Source or Header  |  1994-12-04  |  33.8 KB  |  984 lines

  1. #ifndef LIBRARIES_BGUI_MACROS_H
  2. #define LIBRARIES_BGUI_MACROS_H
  3. /*
  4. **      $VER: libraries/bgui_macros.h 38.3 (4.12.94)
  5. **      bgui.library macros.
  6. **
  7. **      (C) Copyright 1993-1994 Jaba Development.
  8. **      (C) Copyright 1993-1994 Jan van den Baard.
  9. **      All Rights Reserved.
  10. **/
  11.  
  12. #ifndef LIBRARIES_BGUI_H
  13. #include "bgui.h"
  14. #endif /* LIBRARIES_BGUI_H */
  15.  
  16. /*****************************************************************************
  17.  *
  18.  *      General object creation macros.
  19.  */
  20. #define HGroupObject            BGUI_NewObject( BGUI_GROUP_GADGET
  21. #define VGroupObject            BGUI_NewObject( BGUI_GROUP_GADGET,\
  22.                                                 GROUP_Style, GRSTYLE_VERTICAL
  23. #define ButtonObject            BGUI_NewObject( BGUI_BUTTON_GADGET
  24. #define ToggleObject            BGUI_NewObject( BGUI_BUTTON_GADGET,\
  25.                                                 GA_ToggleSelect, TRUE
  26. #define CycleObject             BGUI_NewObject( BGUI_CYCLE_GADGET
  27. #define CheckBoxObject          BGUI_NewObject( BGUI_CHECKBOX_GADGET
  28. #define InfoObject              BGUI_NewObject( BGUI_INFO_GADGET
  29. #define StringObject            BGUI_NewObject( BGUI_STRING_GADGET
  30. #define PropObject              BGUI_NewObject( BGUI_PROP_GADGET
  31. #define IndicatorObject         BGUI_NewObject( BGUI_INDICATOR_GADGET
  32. #define ProgressObject          BGUI_NewObject( BGUI_PROGRESS_GADGET
  33. #define SliderObject            BGUI_NewObject( BGUI_SLIDER_GADGET
  34. #define PageObject              BGUI_NewObject( BGUI_PAGE_GADGET
  35. #define MxObject                BGUI_NewObject( BGUI_MX_GADGET
  36. #define ListviewObject          BGUI_NewObject( BGUI_LISTVIEW_GADGET
  37. #define ExternalObject          BGUI_NewObject( BGUI_EXTERNAL_GADGET, GA_Left, 0, GA_Top, 0, GA_Width, 0, GA_Height, 0
  38. #define SeperatorObject         BGUI_NewObject( BGUI_SEPERATOR_GADGET
  39.  
  40. #define WindowObject            BGUI_NewObject( BGUI_WINDOW_OBJECT
  41. #define FileReqObject           BGUI_NewObject( BGUI_FILEREQ_OBJECT
  42. #define CommodityObject         BGUI_NewObject( BGUI_COMMODITY_OBJECT
  43.  
  44. #define EndObject               TAG_END )
  45.  
  46. /*****************************************************************************
  47.  *
  48.  *      Label creation.
  49.  */
  50. #define Label(l)                LAB_Label, l
  51. #define UScoreLabel(l,u)        LAB_Label, l, LAB_Underscore, u
  52. #define Style(s)                LAB_Style, s
  53. #define Place(p)                LAB_Place, p
  54.  
  55. /*****************************************************************************
  56.  *
  57.  *      Frames.
  58.  */
  59. #define ButtonFrame             FRM_Type, FRTYPE_BUTTON
  60. #define RidgeFrame              FRM_Type, FRTYPE_RIDGE
  61. #define DropBoxFrame            FRM_Type, FRTYPE_DROPBOX
  62. #define NeXTFrame               FRM_Type, FRTYPE_NEXT
  63. #define RadioFrame              FRM_Type, FRTYPE_RADIOBUTTON
  64. #define XenFrame                FRM_Type, FRTYPE_XEN_BUTTON
  65.  
  66. /* For clarity. */
  67. #define StringFrame             RidgeFrame
  68. #define MxFrame                 RadioFrame
  69.  
  70. #define FrameTitle(t)           FRM_Title, t
  71.  
  72. /* Built-in back fills */
  73. #define ShineRaster             FRM_BackFill, SHINE_RASTER
  74. #define ShadowRaster            FRM_BackFill, SHADOW_RASTER
  75. #define ShineShadowRaster       FRM_BackFill, SHINE_SHADOW_RASTER
  76. #define FillRaster              FRM_BackFill, FILL_RASTER
  77. #define ShineFillRaster         FRM_BackFill, SHINE_FILL_RASTER
  78. #define ShadowFillRaster        FRM_BackFill, SHADOW_FILL_RASTER
  79. #define ShineBlock              FRM_BackFill, SHINE_BLOCK
  80. #define ShadowBlock             FRM_BackFill, SHADOW_BLOCK
  81.  
  82. /*****************************************************************************
  83.  *
  84.  *      Vector images.
  85.  */
  86. #define GetPath                 VIT_BuiltIn, BUILTIN_GETPATH
  87. #define GetFile                 VIT_BuiltIn, BUILTIN_GETFILE
  88. #define CheckMark               VIT_BuiltIn, BUILTIN_CHECKMARK
  89. #define PopUp                   VIT_BuiltIn, BUILTIN_POPUP
  90. #define ArrowUp                 VIT_BuiltIn, BUILTIN_ARROW_UP
  91. #define ArrowDown               VIT_BuiltIn, BUILTIN_ARROW_DOWN
  92. #define ArrowLeft               VIT_BuiltIn, BUILTIN_ARROW_LEFT
  93. #define ArrowRight              VIT_BuiltIn, BUILTIN_ARROW_RIGHT
  94.  
  95. /*****************************************************************************
  96.  *
  97.  *      Group class macros.
  98.  */
  99. #define StartMember             GROUP_Member
  100. #define EndMember               TAG_END, 0
  101. #define Spacing(p)              GROUP_Spacing, p
  102. #define HOffset(p)              GROUP_HorizOffset, p
  103. #define VOffset(p)              GROUP_VertOffset, p
  104. #define LOffset(p)              GROUP_LeftOffset, p
  105. #define ROffset(p)              GROUP_RightOffset, p
  106. #define TOffset(p)              GROUP_TopOffset, p
  107. #define BOffset(p)              GROUP_BottomOffset, p
  108. #define VarSpace(w)             GROUP_SpaceObject, w
  109. #define EqualWidth              GROUP_EqualWidth, TRUE
  110. #define EqualHeight             GROUP_EqualHeight, TRUE
  111.  
  112. /*****************************************************************************
  113.  *
  114.  *      Layout macros.
  115.  */
  116. #define FixMinWidth             LGO_FixMinWidth, TRUE
  117. #define FixMinHeight            LGO_FixMinHeight, TRUE
  118. #define Weight(w)               LGO_Weight, w
  119. #define FixWidth(w)             LGO_FixWidth, w
  120. #define FixHeight(h)            LGO_FixHeight, h
  121. #define Align                   LGO_Align, TRUE
  122. #define FixMinSize              FixMinWidth, FixMinHeight
  123. #define FixSize(w,h)            FixWidth(w), FixHeight(h)
  124. #define NoAlign                 LGO_NoAlign, TRUE
  125.  
  126. /*****************************************************************************
  127.  *
  128.  *      Page class macros.
  129.  */
  130. #define PageMember              PAGE_Member
  131.  
  132. /*****************************************************************************
  133.  *
  134.  *      "Quick" button creation macros.
  135.  */
  136. #define Button(label,id)\
  137.         ButtonObject,\
  138.                 LAB_Label,              label,\
  139.                 GA_ID,                  id,\
  140.                 ButtonFrame,\
  141.         EndObject
  142.  
  143. #define KeyButton(label,id)\
  144.         ButtonObject,\
  145.                 LAB_Label,              label,\
  146.                 LAB_Underscore,         '_',\
  147.                 GA_ID,                  id,\
  148.                 ButtonFrame,\
  149.         EndObject
  150.  
  151. #define Toggle(label,state,id)\
  152.         ToggleObject,\
  153.                 LAB_Label,              label,\
  154.                 GA_ID,                  id,\
  155.                 GA_Selected,            state,\
  156.                 ButtonFrame,\
  157.         EndObject
  158.  
  159. #define KeyToggle(label,state,id)\
  160.         ToggleObject,\
  161.                 LAB_Label,              label,\
  162.                 LAB_Underscore,         '_',\
  163.                 GA_ID,                  id,\
  164.                 GA_Selected,            state,\
  165.                 ButtonFrame,\
  166.         EndObject
  167.  
  168. #define XenButton(label,id)\
  169.         ButtonObject,\
  170.                 LAB_Label,              label,\
  171.                 GA_ID,                  id,\
  172.                 XenFrame,\
  173.         EndObject
  174.  
  175. #define XenKeyButton(label,id)\
  176.         ButtonObject,\
  177.                 LAB_Label,              label,\
  178.                 LAB_Underscore,         '_',\
  179.                 GA_ID,                  id,\
  180.                 XenFrame,\
  181.         EndObject
  182.  
  183. #define XenToggle(label,state,id)\
  184.         ToggleObject,\
  185.                 LAB_Label,              label,\
  186.                 GA_ID,                  id,\
  187.                 GA_Selected,            state,\
  188.                 XenFrame,\
  189.         EndObject
  190.  
  191. #define XenKeyToggle(label,state,id)\
  192.         ToggleObject,\
  193.                 LAB_Label,              label,\
  194.                 LAB_Underscore,         '_',\
  195.                 GA_ID,                  id,\
  196.                 GA_Selected,            state,\
  197.                 XenFrame,\
  198.         EndObject
  199.  
  200. /*****************************************************************************
  201.  *
  202.  *      "Quick" cycle creation macros.
  203.  */
  204. #define Cycle(label,labels,active,id)\
  205.         CycleObject,\
  206.                 LAB_Label,              label,\
  207.                 GA_ID,                  id,\
  208.                 ButtonFrame,\
  209.                 CYC_Labels,             labels,\
  210.                 CYC_Active,             active,\
  211.         EndObject
  212.  
  213. #define KeyCycle(label,labels,active,id)\
  214.         CycleObject,\
  215.                 LAB_Label,              label,\
  216.                 LAB_Underscore,         '_',\
  217.                 GA_ID,                  id,\
  218.                 ButtonFrame,\
  219.                 CYC_Labels,             labels,\
  220.                 CYC_Active,             active,\
  221.         EndObject
  222.  
  223. #define XenCycle(label,labels,active,id)\
  224.         CycleObject,\
  225.                 LAB_Label,              label,\
  226.                 GA_ID,                  id,\
  227.                 XenFrame,\
  228.                 CYC_Labels,             labels,\
  229.                 CYC_Active,             active,\
  230.         EndObject
  231.  
  232. #define XenKeyCycle(label,labels,active,id)\
  233.         CycleObject,\
  234.                 LAB_Label,              label,\
  235.                 LAB_Underscore,         '_',\
  236.                 GA_ID,                  id,\
  237.                 XenFrame,\
  238.                 CYC_Labels,             labels,\
  239.                 CYC_Active,             active,\
  240.         EndObject
  241.  
  242. #define PopCycle(label,labels,active,id)\
  243.         CycleObject,\
  244.                 LAB_Label,              label,\
  245.                 GA_ID,                  id,\
  246.                 ButtonFrame,\
  247.                 CYC_Labels,             labels,\
  248.                 CYC_Active,             active,\
  249.                 CYC_Popup,              TRUE,\
  250.         EndObject
  251.  
  252. #define KeyPopCycle(label,labels,active,id)\
  253.         CycleObject,\
  254.                 LAB_Label,              label,\
  255.                 LAB_Underscore,         '_',\
  256.                 GA_ID,                  id,\
  257.                 ButtonFrame,\
  258.                 CYC_Labels,             labels,\
  259.                 CYC_Active,             active,\
  260.                 CYC_Popup,              TRUE,\
  261.         EndObject
  262.  
  263. #define XenPopCycle(label,labels,active,id)\
  264.         CycleObject,\
  265.                 LAB_Label,              label,\
  266.                 GA_ID,                  id,\
  267.                 XenFrame,\
  268.                 CYC_Labels,             labels,\
  269.                 CYC_Active,             active,\
  270.                 CYC_Popup,              TRUE,\
  271.         EndObject
  272.  
  273. #define XenKeyPopCycle(label,labels,active,id)\
  274.         CycleObject,\
  275.                 LAB_Label,              label,\
  276.                 LAB_Underscore,         '_',\
  277.                 GA_ID,                  id,\
  278.                 XenFrame,\
  279.                 CYC_Labels,             labels,\
  280.                 CYC_Active,             active,\
  281.                 CYC_Popup,              TRUE,\
  282.         EndObject
  283.  
  284. /*****************************************************************************
  285.  *
  286.  *      "Quick" checkbox creation macros.
  287.  */
  288. #define CheckBox(label,state,id)\
  289.         CheckBoxObject,\
  290.                 LAB_Label,              label,\
  291.                 GA_ID,                  id,\
  292.                 ButtonFrame,\
  293.                 FRM_Flags,              FRF_EDGES_ONLY,\
  294.                 GA_Selected,            state,\
  295.         EndObject, FixMinSize
  296.  
  297. #define KeyCheckBox(label,state,id)\
  298.         CheckBoxObject,\
  299.                 LAB_Label,              label,\
  300.                 LAB_Underscore,         '_',\
  301.                 GA_ID,                  id,\
  302.                 ButtonFrame,\
  303.                 FRM_Flags,              FRF_EDGES_ONLY,\
  304.                 GA_Selected,            state,\
  305.         EndObject, FixMinSize
  306.  
  307. #define XenCheckBox(label,state,id)\
  308.         CheckBoxObject,\
  309.                 LAB_Label,              label,\
  310.                 GA_ID,                  id,\
  311.                 XenFrame,\
  312.                 FRM_Flags,              FRF_EDGES_ONLY,\
  313.                 GA_Selected,            state,\
  314.         EndObject, FixMinSize
  315.  
  316. #define XenKeyCheckBox(label,state,id)\
  317.         CheckBoxObject,\
  318.                 LAB_Label,              label,\
  319.                 LAB_Underscore,         '_',\
  320.                 GA_ID,                  id,\
  321.                 XenFrame,\
  322.                 FRM_Flags,              FRF_EDGES_ONLY,\
  323.                 GA_Selected,            state,\
  324.         EndObject, FixMinSize
  325.  
  326. #define CheckBoxNF(label,state,id)\
  327.         CheckBoxObject,\
  328.                 LAB_Label,              label,\
  329.                 GA_ID,                  id,\
  330.                 ButtonFrame,\
  331.                 FRM_Flags,              FRF_EDGES_ONLY,\
  332.                 GA_Selected,            state,\
  333.         EndObject,
  334.  
  335. #define KeyCheckBoxNF(label,state,id)\
  336.         CheckBoxObject,\
  337.                 LAB_Label,              label,\
  338.                 LAB_Underscore,         '_',\
  339.                 GA_ID,                  id,\
  340.                 ButtonFrame,\
  341.                 FRM_Flags,              FRF_EDGES_ONLY,\
  342.                 GA_Selected,            state,\
  343.         EndObject,
  344.  
  345. #define XenCheckBoxNF(label,state,id)\
  346.         CheckBoxObject,\
  347.                 LAB_Label,              label,\
  348.                 GA_ID,                  id,\
  349.                 XenFrame,\
  350.                 FRM_Flags,              FRF_EDGES_ONLY,\
  351.                 GA_Selected,            state,\
  352.         EndObject,
  353.  
  354. #define XenKeyCheckBoxNF(label,state,id)\
  355.         CheckBoxObject,\
  356.                 LAB_Label,              label,\
  357.                 LAB_Underscore,         '_',\
  358.                 GA_ID,                  id,\
  359.                 XenFrame,\
  360.                 FRM_Flags,              FRF_EDGES_ONLY,\
  361.                 GA_Selected,            state,\
  362.         EndObject,
  363.  
  364. /*****************************************************************************
  365.  *
  366.  *      "Quick" info object creation macros.
  367.  */
  368. #define InfoFixed(label,text,args,numlines)\
  369.         InfoObject,\
  370.                 LAB_Label,              label,\
  371.                 ButtonFrame,\
  372.                 FRM_Flags,              FRF_RECESSED,\
  373.                 INFO_TextFormat,        text,\
  374.                 INFO_Args,              args,\
  375.                 INFO_MinLines,          numlines,\
  376.                 INFO_FixTextWidth,      TRUE,\
  377.         EndObject
  378.  
  379. #define InfoObj(label,text,args,numlines)\
  380.         InfoObject,\
  381.                 LAB_Label,              label,\
  382.                 ButtonFrame,\
  383.                 FRM_Flags,              FRF_RECESSED,\
  384.                 INFO_TextFormat,        text,\
  385.                 INFO_Args,              args,\
  386.                 INFO_MinLines,          numlines,\
  387.         EndObject
  388.  
  389. /*****************************************************************************
  390.  *
  391.  *      "Quick" string/integer creation macros.
  392.  */
  393. #define String(label,contents,maxchars,id)\
  394.         StringObject,\
  395.                 LAB_Label,              label,\
  396.                 RidgeFrame,\
  397.                 STRINGA_TextVal,        contents,\
  398.                 STRINGA_MaxChars,       maxchars,\
  399.                 GA_ID,                  id,\
  400.         EndObject
  401.  
  402. #define KeyString(label,contents,maxchars,id)\
  403.         StringObject,\
  404.                 LAB_Label,              label,\
  405.                 LAB_Underscore,         '_',\
  406.                 RidgeFrame,\
  407.                 STRINGA_TextVal,        contents,\
  408.                 STRINGA_MaxChars,       maxchars,\
  409.                 GA_ID,                  id,\
  410.         EndObject
  411.  
  412. #define TabString(label,contents,maxchars,id)\
  413.         StringObject,\
  414.                 LAB_Label,              label,\
  415.                 RidgeFrame,\
  416.                 STRINGA_TextVal,        contents,\
  417.                 STRINGA_MaxChars,       maxchars,\
  418.                 GA_ID,                  id,\
  419.                 GA_TabCycle,            TRUE,\
  420.         EndObject
  421.  
  422. #define TabKeyString(label,contents,maxchars,id)\
  423.         StringObject,\
  424.                 LAB_Label,              label,\
  425.                 LAB_Underscore,         '_',\
  426.                 RidgeFrame,\
  427.                 STRINGA_TextVal,        contents,\
  428.                 STRINGA_MaxChars,       maxchars,\
  429.                 GA_ID,                  id,\
  430.                 GA_TabCycle,            TRUE,\
  431.         EndObject
  432.  
  433. #define Integer(label,contents,maxchars,id)\
  434.         StringObject,\
  435.                 LAB_Label,              label,\
  436.                 RidgeFrame,\
  437.                 STRINGA_LongVal,        contents,\
  438.                 STRINGA_MaxChars,       maxchars,\
  439.                 GA_ID,                  id,\
  440.         EndObject
  441.  
  442. #define KeyInteger(label,contents,maxchars,id)\
  443.         StringObject,\
  444.                 LAB_Label,              label,\
  445.                 LAB_Underscore,         '_',\
  446.                 RidgeFrame,\
  447.                 STRINGA_LongVal,        contents,\
  448.                 STRINGA_MaxChars,       maxchars,\
  449.                 GA_ID,                  id,\
  450.         EndObject
  451.  
  452. #define TabInteger(label,contents,maxchars,id)\
  453.         StringObject,\
  454.                 LAB_Label,              label,\
  455.                 RidgeFrame,\
  456.                 STRINGA_LongVal,        contents,\
  457.                 STRINGA_MaxChars,       maxchars,\
  458.                 GA_ID,                  id,\
  459.                 GA_TabCycle,            TRUE,\
  460.         EndObject
  461.  
  462. #define TabKeyInteger(label,contents,maxchars,id)\
  463.         StringObject,\
  464.                 LAB_Label,              label,\
  465.                 LAB_Underscore,         '_',\
  466.                 RidgeFrame,\
  467.                 STRINGA_LongVal,        contents,\
  468.                 STRINGA_MaxChars,       maxchars,\
  469.                 GA_ID,                  id,\
  470.                 GA_TabCycle,            TRUE,\
  471.         EndObject
  472.  
  473. /*
  474.  *      STRINGA_Pens & STRINGA_ActivePens pen-pack macro.
  475.  */
  476. #define PACKPENS(a,b) (((b<<8)&0xFF00)|((a)&0x00FF))
  477.  
  478. /*****************************************************************************
  479.  *
  480.  *      "Quick" scroller creation macros.
  481.  */
  482. #define HorizScroller(label,top,total,visible,id)\
  483.         PropObject,\
  484.                 LAB_Label,              label,\
  485.                 PGA_Top,                top,\
  486.                 PGA_Total,              total,\
  487.                 PGA_Visible,            visible,\
  488.                 PGA_Freedom,            FREEHORIZ,\
  489.                 GA_ID,                  id,\
  490.                 PGA_Arrows,             TRUE,\
  491.         EndObject
  492.  
  493. #define VertScroller(label,top,total,visible,id)\
  494.         PropObject,\
  495.                 LAB_Label,              label,\
  496.                 PGA_Top,                top,\
  497.                 PGA_Total,              total,\
  498.                 PGA_Visible,            visible,\
  499.                 GA_ID,                  id,\
  500.                 PGA_Arrows,             TRUE,\
  501.         EndObject
  502.  
  503. #define KeyHorizScroller(label,top,total,visible,id)\
  504.         PropObject,\
  505.                 LAB_Label,              label,\
  506.                 LAB_Underscore,         '_',\
  507.                 PGA_Top,                top,\
  508.                 PGA_Total,              total,\
  509.                 PGA_Visible,            visible,\
  510.                 PGA_Freedom,            FREEHORIZ,\
  511.                 GA_ID,                  id,\
  512.                 PGA_Arrows,             TRUE,\
  513.         EndObject
  514.  
  515. #define KeyVertScroller(label,top,total,visible,id)\
  516.         PropObject,\
  517.                 LAB_Label,              label,\
  518.                 LAB_Underscore,         '_',\
  519.                 PGA_Top,                top,\
  520.                 PGA_Total,              total,\
  521.                 PGA_Visible,            visible,\
  522.                 GA_ID,                  id,\
  523.                 PGA_Arrows,             TRUE,\
  524.         EndObject
  525.  
  526. /*****************************************************************************
  527.  *
  528.  *      "Quick" indicator creation macros.
  529.  */
  530. #define Indicator(min,max,level,just)\
  531.         IndicatorObject,\
  532.                 INDIC_Min,              min,\
  533.                 INDIC_Max,              max,\
  534.                 INDIC_Level,            level,\
  535.                 INDIC_Justification,    just,\
  536.         EndObject
  537.  
  538. #define IndicatorFormat(min,max,level,just,format)\
  539.         IndicatorObject,\
  540.                 INDIC_Min,              min,\
  541.                 INDIC_Max,              max,\
  542.                 INDIC_Level,            level,\
  543.                 INDIC_Justification,    just,\
  544.                 INDIC_FormatString,     format,\
  545.         EndObject
  546.  
  547. /*****************************************************************************
  548.  *
  549.  *      "Quick" progress creation macros.
  550.  */
  551. #define HorizProgress(label,min,max,done)\
  552.         ProgressObject,\
  553.                 LAB_Label,              label,\
  554.                 ButtonFrame,\
  555.                 FRM_Flags,              FRF_RECESSED,\
  556.                 PROGRESS_Min,           min,\
  557.                 PROGRESS_Max,           max,\
  558.                 PROGRESS_Done,          done,\
  559.         EndObject
  560.  
  561. #define VertProgress(label,min,max,done)\
  562.         ProgressObject,\
  563.                 LAB_Label,              label,\
  564.                 ButtonFrame,\
  565.                 FRM_Flags,              FRF_RECESSED,\
  566.                 PROGRESS_Min,           min,\
  567.                 PROGRESS_Max,           max,\
  568.                 PROGRESS_Done,          done,\
  569.                 PROGRESS_Vertical,      TRUE,\
  570.         EndObject
  571.  
  572. /*****************************************************************************
  573.  *
  574.  *      "Quick" slider creation macros.
  575.  */
  576. #define HorizSlider(label,min,max,level,id)\
  577.         SliderObject,\
  578.                 LAB_Label,              label,\
  579.                 SLIDER_Min,             min,\
  580.                 SLIDER_Max,             max,\
  581.                 SLIDER_Level,           level,\
  582.                 GA_ID,                  id,\
  583.         EndObject
  584.  
  585. #define VertSlider(label,min,max,level,id)\
  586.         SliderObject,\
  587.                 LAB_Label,              label,\
  588.                 SLIDER_Min,             min,\
  589.                 SLIDER_Max,             max,\
  590.                 SLIDER_Level,           level,\
  591.                 PGA_Freedom,            FREEVERT,\
  592.                 GA_ID,                  id,\
  593.         EndObject
  594.  
  595. #define KeyHorizSlider(label,min,max,level,id)\
  596.         SliderObject,\
  597.                 LAB_Label,              label,\
  598.                 LAB_Underscore,         '_',\
  599.                 SLIDER_Min,             min,\
  600.                 SLIDER_Max,             max,\
  601.                 SLIDER_Level,           level,\
  602.                 GA_ID,                  id,\
  603.         EndObject
  604.  
  605. #define KeyVertSlider(label,min,max,level,id)\
  606.         SliderObject,\
  607.                 LAB_Label,              label,\
  608.                 LAB_Underscore,         '_',\
  609.                 SLIDER_Min,             min,\
  610.                 SLIDER_Max,             max,\
  611.                 SLIDER_Level,           level,\
  612.                 PGA_Freedom,            FREEVERT,\
  613.                 GA_ID,                  id,\
  614.         EndObject
  615.  
  616. /*****************************************************************************
  617.  *
  618.  *      "Quick" mx creation macros.
  619.  */
  620. #define RightMx(label,labels,active,id)\
  621.         MxObject,\
  622.                 GROUP_Style,            GRSTYLE_VERTICAL,\
  623.                 LAB_Label,              label,\
  624.                 MX_Labels,              labels,\
  625.                 MX_Active,              active,\
  626.                 GA_ID,                  id,\
  627.         EndObject, FixMinSize
  628.  
  629. #define LeftMx(label,labels,active,id)\
  630.         MxObject,\
  631.                 GROUP_Style,            GRSTYLE_VERTICAL,\
  632.                 LAB_Label,              label,\
  633.                 MX_Labels,              labels,\
  634.                 MX_Active,              active,\
  635.                 MX_LabelPlace,          PLACE_LEFT,\
  636.                 GA_ID,                  id,\
  637.         EndObject, FixMinSize
  638.  
  639. #define RightMxKey(label,labels,active,id)\
  640.         MxObject,\
  641.                 GROUP_Style,            GRSTYLE_VERTICAL,\
  642.                 LAB_Label,              label,\
  643.                 LAB_Underscore,         '_',\
  644.                 MX_Labels,              labels,\
  645.                 MX_Active,              active,\
  646.                 GA_ID,                  id,\
  647.         EndObject, FixMinSize
  648.  
  649. #define LeftMxKey(label,labels,active,id)\
  650.         MxObject,\
  651.                 GROUP_Style,            GRSTYLE_VERTICAL,\
  652.                 LAB_Label,              label,\
  653.                 LAB_Underscore,         '_',\
  654.                 MX_Labels,              labels,\
  655.                 MX_Active,              active,\
  656.                 MX_LabelPlace,          PLACE_LEFT,\
  657.                 GA_ID,                  id,\
  658.         EndObject, FixMinSize
  659.  
  660. #define Tabs(label,labels,active,id)\
  661.         MxObject,\
  662.                 MX_TabsObject,          TRUE,\
  663.                 LAB_Label,              label,\
  664.                 MX_Labels,              labels,\
  665.                 MX_Active,              active,\
  666.                 GA_ID,                  id,\
  667.         EndObject, FixMinHeight
  668.  
  669. #define TabsKey(label,labels,active,id)\
  670.         MxObject,\
  671.                 MX_TabsObject,          TRUE,\
  672.                 LAB_Label,              label,\
  673.                 LAB_Underscore,         '_',\
  674.                 MX_Labels,              labels,\
  675.                 MX_Active,              active,\
  676.                 GA_ID,                  id,\
  677.         EndObject, FixMinHeight
  678.  
  679. #define TabsEqual(label,labels,active,id)\
  680.         MxObject,\
  681.                 GROUP_EqualWidth,       TRUE,\
  682.                 MX_TabsObject,          TRUE,\
  683.                 LAB_Label,              label,\
  684.                 MX_Labels,              labels,\
  685.                 MX_Active,              active,\
  686.                 GA_ID,                  id,\
  687.         EndObject, FixMinHeight
  688.  
  689. #define TabsEqualKey(label,labels,active,id)\
  690.         MxObject,\
  691.                 GROUP_EqualWidth,       TRUE,\
  692.                 MX_TabsObject,          TRUE,\
  693.                 LAB_Label,              label,\
  694.                 LAB_Underscore,         '_',\
  695.                 MX_Labels,              labels,\
  696.                 MX_Active,              active,\
  697.                 GA_ID,                  id,\
  698.         EndObject, FixMinHeight
  699.  
  700. /*****************************************************************************
  701.  *
  702.  *      "Quick" listview creation macros.
  703.  */
  704. #define StrListview(label,strings,id)\
  705.         ListviewObject,\
  706.                 LAB_Label,              label,\
  707.                 GA_ID,                  id,\
  708.                 LISTV_EntryArray,       strings,\
  709.         EndObject
  710.  
  711. #define StrListviewSorted(label,strings,id)\
  712.         ListviewObject,\
  713.                 LAB_Label,              label,\
  714.                 GA_ID,                  id,\
  715.                 LISTV_EntryArray,       strings,\
  716.                 LISTV_SortEntryArray,   TRUE,\
  717.         EndObject
  718.  
  719. #define ReadStrListview(label,strings)\
  720.         ListviewObject,\
  721.                 LAB_Label,              label,\
  722.                 LISTV_EntryArray,       strings,\
  723.                 LISTV_ReadOnly,         TRUE,\
  724.         EndObject
  725.  
  726. #define ReadStrListviewSorted(label,strings)\
  727.         ListviewObject,\
  728.                 LAB_Label,              label,\
  729.                 LISTV_EntryArray,       strings,\
  730.                 LISTV_SortEntryArray,   TRUE,\
  731.                 LISTV_ReadOnly,         TRUE,\
  732.         EndObject
  733.  
  734. #define MultiStrListview(label,strings,id)\
  735.         ListviewObject,\
  736.                 LAB_Label,              label,\
  737.                 GA_ID,                  id,\
  738.                 LISTV_EntryArray,       strings,\
  739.                 LISTV_MultiSelect,      TRUE,\
  740.         EndObject
  741.  
  742. #define MultiStrListviewSorted(label,strings,id)\
  743.         ListviewObject,\
  744.                 LAB_Label,              label,\
  745.                 GA_ID,                  id,\
  746.                 LISTV_EntryArray,       strings,\
  747.                 LISTV_SortEntryArray,   TRUE,\
  748.                 LISTV_MultiSelect,      TRUE,\
  749.         EndObject
  750.  
  751. /*****************************************************************************
  752.  *
  753.  *      "Quick" seperator bar creation macros.
  754.  */
  755. #define VertSeperator\
  756.         SeperatorObject,\
  757.         EndObject, FixMinWidth
  758.  
  759. #define VertThinSeperator\
  760.         SeperatorObject,\
  761.                 SEP_Thin,               TRUE,\
  762.         EndObject, FixMinWidth
  763.  
  764. #define HorizSeperator\
  765.         SeperatorObject,\
  766.                 SEP_Horiz,              TRUE,\
  767.         EndObject, FixMinHeight
  768.  
  769. #define TitleSeperator(t)\
  770.         SeperatorObject,\
  771.                 SEP_Horiz,              TRUE,\
  772.                 SEP_Title,              t,\
  773.         EndObject, FixMinHeight
  774.  
  775. #define HTitleSeperator(t)\
  776.         SeperatorObject,\
  777.                 SEP_Horiz,              TRUE,\
  778.                 SEP_Title,              t,\
  779.                 SEP_Highlight,          TRUE,\
  780.         EndObject, FixMinHeight
  781.  
  782. #define CTitleSeperator(t)\
  783.         SeperatorObject,\
  784.                 SEP_Horiz,              TRUE,\
  785.                 SEP_Title,              t,\
  786.                 SEP_CenterTitle,        TRUE,\
  787.         EndObject, FixMinHeight
  788.  
  789. #define CHTitleSeperator(t)\
  790.         SeperatorObject,\
  791.                 SEP_Horiz,              TRUE,\
  792.                 SEP_Title,              t,\
  793.                 SEP_Highlight,          TRUE,\
  794.                 SEP_CenterTitle,        TRUE,\
  795.         EndObject, FixMinHeight
  796.  
  797. /*****************************************************************************
  798.  *
  799.  *      Some simple menu macros.
  800.  */
  801. #define Title(t)\
  802.         { NM_TITLE, t, NULL, 0, 0, NULL }
  803. #define Item(t,s,i)\
  804.         { NM_ITEM, t, s, 0, 0, (APTR)i }
  805. #define ItemBar\
  806.         { NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL }
  807. #define SubItem(t,s,i)\
  808.         { NM_SUB, t, s, 0, 0, (APTR)i }
  809. #define SubBar\
  810.         { NM_SUB, NM_BARLABEL, NULL, 0, 0, NULL }
  811. #define End\
  812.         { NM_END, NULL, NULL, 0, 0, NULL }
  813.  
  814. /*****************************************************************************
  815.  *
  816.  *      Base class method macros.
  817.  */
  818. #define AddMap(object,target,map)\
  819.         DoMethod( object, BASE_ADDMAP, target, map )
  820.  
  821. #define AddCondit(object,target,ttag,tdat,ftag,fdat,stag,sdat)\
  822.         DoMethod( object, BASE_ADDCONDITIONAL, target,\
  823.                   ttag, tdat,\
  824.                   ftag, fdat,\
  825.                   stag, sdat )
  826.  
  827. #define AddHook(object,hook)\
  828.         DoMethod( object, BASE_ADDHOOK, hook )
  829.  
  830. #define RemMap(object,target)\
  831.         DoMethod( object, BASE_REMMAP, target )
  832.  
  833. #define RemCondit(object,target)\
  834.         DoMethod( object, BASE_REMCONDITIONAL, target )
  835.  
  836. #define RemHook( object,hook)\
  837.         DoMethod( object, BASE_REMHOOK, hook )
  838.  
  839. /*****************************************************************************
  840.  *
  841.  *      Listview class method macros.
  842.  */
  843. #define AddEntry(window,object,entry,how)\
  844.         BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
  845.                              NULL, entry, how, 0L )
  846.  
  847. #define AddEntryVisible(window,object,entry,how)\
  848.         BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
  849.                              NULL, entry, how, LVASF_MAKEVISIBLE )
  850.  
  851. #define AddEntrySelect(window,object,entry,how)\
  852.         BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
  853.                              NULL, entry, how, LVASF_SELECT )
  854.  
  855. #define ClearList(window,object)\
  856.         BGUI_DoGadgetMethod( object, window, NULL, LVM_CLEAR, NULL )
  857.  
  858. #define FirstEntry(object)\
  859.         DoMethod( object, LVM_FIRSTENTRY, NULL, 0L )
  860.  
  861. #define FirstSelected(object)\
  862.         DoMethod( object, LVM_FIRSTENTRY, NULL, LVGEF_SELECTED )
  863.  
  864. #define LastEntry(object)\
  865.         DoMethod( object, LVM_LASTENTRY, NULL, 0L )
  866.  
  867. #define LastSelected(object)\
  868.         DoMethod( object, LVM_LASTENTRY, NULL, LVGEF_SELECTED )
  869.  
  870. #define NextEntry(object,last)\
  871.         DoMethod( object, LVM_NEXTENTRY, last, 0L )
  872.  
  873. #define NextSelected(object,last)\
  874.         DoMethod( object, LVM_NEXTENTRY, last, LVGEF_SELECTED )
  875.  
  876. #define PrevEntry(object,last)\
  877.         DoMethod( object, LVM_PREVENTRY, last, 0L )
  878.  
  879. #define PrevSelected(object,last)\
  880.         DoMethod( object, LVM_PREVENTRY, last, LVGEF_SELECTED )
  881.  
  882. #define RemoveEntry(object,entry)\
  883.         DoMethod( object, LVM_REMENTRY, NULL, entry )
  884.  
  885. #define RemoveEntryVisible(window,object,entry)\
  886.         BGUI_DoGadgetMethod( object, window, NULL, LVM_REMENTRY, NULL, entry )
  887.  
  888. #define RefreshList(window,object)\
  889.         BGUI_DoGadgetMethod( object, window, NULL, LVM_REFRESH, NULL )
  890.  
  891. #define SortList(window,object)\
  892.         BGUI_DoGadgetMethod( object, window, NULL, LVM_SORT, NULL )
  893.  
  894. #define LockList(object)\
  895.         DoMethod( object, LVM_LOCKLIST, NULL )
  896.  
  897. #define UnlockList(window,object)\
  898.         BGUI_DoGadgetMethod( object, window, NULL, LVM_UNLOCKLIST, NULL )
  899.  
  900. #define MoveEntry(window,object,entry,dir)\
  901.         BGUI_DoGadgetMethod( object, window, NULL, LVM_MOVE, NULL,\
  902.                              entry, dir )
  903.  
  904. #define MoveSelectedEntry(window,object,dir)\
  905.         BGUI_DoGadgetMethod( object, window, NULL, LVM_MOVE, NULL,\
  906.                              NULL, dir )
  907.  
  908. /*****************************************************************************
  909.  *
  910.  *      Window class method macros.
  911.  */
  912. #define GadgetKey(wobj,gobj,key)\
  913.         DoMethod( wobj, WM_GADGETKEY, NULL, gobj, key )
  914.  
  915. #define WindowOpen(wobj)\
  916.         ( struct Window * )DoMethod( wobj, WM_OPEN )
  917.  
  918. #define WindowClose(wobj)\
  919.         DoMethod( wobj, WM_CLOSE )
  920.  
  921. #define WindowBusy(wobj)\
  922.         DoMethod( wobj, WM_SLEEP )
  923.  
  924. #define WindowReady(wobj)\
  925.         DoMethod( wobj, WM_WAKEUP )
  926.  
  927. #define HandleEvent(wobj)\
  928.         DoMethod( wobj, WM_HANDLEIDCMP )
  929.  
  930. #define DisableMenu(wobj,id,set)\
  931.         DoMethod( wobj, WM_DISABLEMENU, id, set )
  932.  
  933. #define CheckItem(wobj,id,set)\
  934.         DoMethod( wobj, WM_CHECKITEM, id, set )
  935.  
  936. #define MenuDisabled(wobj,id)\
  937.         DoMethod( wobj, WM_MENUDISABLED, id )
  938.  
  939. #define ItemChecked(wobj,id)\
  940.         DoMethod( wobj, WM_ITEMCHECKED, id )
  941.  
  942. #define GetAppMsg(wobj)\
  943.         ( struct AppMessage * )DoMethod( wobj, WM_GETAPPMSG )
  944.  
  945. #define AddUpdate(wobj,id,target,map)\
  946.         DoMethod( wobj, WM_ADDUPDATE, id, target, map )
  947.  
  948. /*****************************************************************************
  949.  *
  950.  *      Commodity class method macros.
  951.  */
  952. #define AddHotkey(broker,desc,id,flags)\
  953.         DoMethod( broker, CM_ADDHOTKEY, desc, id, flags )
  954.  
  955. #define RemHotkey(broker,id)\
  956.         DoMethod( broker, CM_REMHOTKEY, id )
  957.  
  958. #define DisableHotkey(broker,id)\
  959.         DoMethod( broker, CM_DISABLEHOTKEY, id )
  960.  
  961. #define EnableHotKey(broker,id)\
  962.         DoMethod( broker, CM_ENABLEHOTKEY, id )
  963.  
  964. #define EnableBroker(broker)\
  965.         DoMethod( broker, CM_ENABLEBROKER )
  966.  
  967. #define DisableBroker(broker)\
  968.         DoMethod( broker, CM_DISABLEBROKER )
  969.  
  970. #define MsgInfo(broker,type,id,data)\
  971.         DoMethod( broker, CM_MSGINFO,\
  972.                   ( ULONG * )type,\
  973.                   ( ULONG * )id,\
  974.                   ( ULONG * )data )
  975.  
  976. /*****************************************************************************
  977.  *
  978.  *      FileReq class method macros.
  979.  */
  980. #define DoRequest(object)\
  981.         DoMethod( object, FRM_DOREQUEST )
  982.  
  983. #endif /* LIBRARIES_BGUI_MACROS_H */
  984.